<html xmlns:doc="eml://ecoinformatics.org/documentation-2.1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>eml-constraint Documentation </title>
<link href="../default.css" type="text/css" rel="stylesheet">
</head>
<body>
<table width="100%" border="0">
<tr valign="top">
<td>
<div class="title"> Module Documentation: eml-constraint</div>
</td><td><a class="navlink" href="index.html">Back to EML Contents</a></td>
</tr>
</table>
        
          
<div class="sectiontitle">
            The eml-constraint module - Relationships among and within
            dataset entities
          </div>
          
<p>
            The eml-constraint schema defines the integrity constraints
            between entities (e.g., data tables) as they would be maintained in
            a relational management system.  These constraints include primary
            key constraints, foreign key constraints, unique key constraints,
            check constraints, and not null constraints, among potential others.
          </p>
        
        
<div class="title">Module details</div>
<table border="0" class="tabledefault" id="eml-constraint">
<tr>
<td class="tablepanel"> Recommended Usage: </td><td class="tablepanel">All datasets where there are logical constraints between entities</td>
</tr>
<tr>
<td class="tablepanel"> Stand-alone: </td><td class="tablepanel">no</td>
</tr>
<tr>
<td class="tablepanel"> Imports: </td><td class="tablepanel">eml-documentation, eml-resource</td>
</tr>
<tr>
<td class="tablepanel"> Imported By: </td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"> View an image of the schema: </td><td class="tablepanel"><a href="eml-constraint.png" target="offline">eml-constraint image</a></td>
</tr>
</table>
<table class="tabledefault" border="0">
<tr>
<td colspan="2">
<h2>Element Definitions:</h2>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="primaryKey">primaryKey&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ConstraintBaseGroup">ConstraintBaseGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#key">key</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The primaryKey element declares the primary key in
            the entity to which the defined constraint
            pertains.<br>
<span class="boldtext">Example(s): </span>
<br>date<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="key">key&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#attributeReference">attributeReference</a></td><td class="tablepanel">required</td><td class="tablepanel">unbounded</td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The key element defines the set of attributes
                  to which this constraint applies. For a primary key or a
                  unique key, the set of attributes must be identifying. For a
                  foreign key, the set of attributes must match an identifying
                  key in the referenced entity. For a 'not null' constraint, the
                  key indicates the attribute which should not be
                  null.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>plot<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="attributeReference">attributeReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The attributeReference element is the
                        identifier of an attribute that can be found in the
                        identified entity. This id will be unique within an
                        entity and specifies that the attribute participates
                        in the key that is being defined.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="uniqueKey">uniqueKey&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ConstraintBaseGroup">ConstraintBaseGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#key">key</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The uniqueKey element represents a unique key
            within the referenced entity. This is different from a primary key
            in that it does not form any implicit foreign key relationships to
            other entities, however it is required to be unique within the
            entity.<br>
<span class="boldtext">Example(s): </span>
<br>date<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="key">key&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#attributeReference">attributeReference</a></td><td class="tablepanel">required</td><td class="tablepanel">unbounded</td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The key element defines the set of attributes
                  to which this constraint applies. For a primary key or a
                  unique key, the set of attributes must be identifying. For a
                  foreign key, the set of attributes must match an identifying
                  key in the referenced entity. For a 'not null' constraint, the
                  key indicates the attribute which should not be
                  null.<br>
<span class="boldtext">Example(s): </span>
<br>date, site, plot<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="attributeReference">attributeReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The attributeReference element is the
                        identifier of an attribute that can be found in the
                        identified entity. This id will be unique within an
                        entity and specifies that the attribute participates
                        in the key that is being defined.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="checkConstraint">checkConstraint&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ConstraintBaseGroup">ConstraintBaseGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#checkCondition">checkCondition</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Attributes: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Default Value: </span></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#language">language</a></td><td class="tablepanel"><span class="plaintext">optional</span></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The checkConstraint element defines a constraint
            which checks a conditional clause within an
            entity.<br>
<span class="boldtext">Example(s): </span>
<br>if site&gt;1 then plot&gt;10<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="checkCondition">checkCondition&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The checkCondition element defines an SQL
                  statement or other language implementation of the condition
                  for a check constraint.  Generally this provides a means for
                  constraining the values within and among
                  entities.<br>
<span class="boldtext">Example(s): </span>
<br>(year &gt; 1900 and year &lt;
                  1990)<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="foreignKey">foreignKey&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The foreignKey element defines a foreign key
            relationship among entities which relates this entity to another's
            primary key.
            </blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="joinCondition">joinCondition&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ForeignKeyGroup">ForeignKeyGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#referencedKey">referencedKey</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The joinCondition element describes any join of two
            tables that is not done with a primary/foreign key
            relationship.<br>
<span class="boldtext">Example(s): </span>
<br>JOIN code<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="referencedKey">referencedKey&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#attributeReference">attributeReference</a></td><td class="tablepanel">required</td><td class="tablepanel">unbounded</td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The referencedKey element defines set of
                  attributes to which a foreign key constraint refers. If the
                  key refers to the primary key in the referenced entity, then
                  the "referencedKey" is optional.  For a foreign key, the set
                  of attributes must match an identifying key in the referenced
                  entity.<br>
<span class="boldtext">Example(s): </span>
<br>site, plot<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="attributeReference">attributeReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The attributeReference element is the
                        identifier of an attribute that can be found in the
                        identified entity. This id will be unique within an
                        entity and specifies that the attribute participates
                        in the key that is being defined.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="notNullConstraint">notNullConstraint&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ConstraintBaseGroup">ConstraintBaseGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#key">key</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The notNullConstraint element defines a constraint
            that indicates that no null values should be present for an
            attribute in this entity.</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="key">key&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#attributeReference">attributeReference</a></td><td class="tablepanel">required</td><td class="tablepanel">unbounded</td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The key element defines the set of attributes
                  to which this constraint applies. For a primary key or a
                  unique key, the set of attributes must be identifying. For a
                  foreign key, the set of attributes must match an identifying
                  key in the referenced entity. For a 'not null' constraint, the
                  key indicates the attribute which should not be
                  null.</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="attributeReference">attributeReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The attributeReference element is the
                        identifier of an attribute that can be found in the
                        identified entity. This id will be unique within an
                        entity and specifies that the attribute participates
                        in the key that is being defined.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="constraintName">constraintName&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The constraintName element is a name which
            represents a human readable and meaningful name for the
            constraint.<br>
<span class="boldtext">Example(s): </span>
<br>PrimaryKey_birdSurvey<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="constraintDescription">constraintDescription&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0"></table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The constraintDescription element describes the
            nature of the constraint. It might be a description of a check
            condition, or a statement about the composition of a primary key or
            the nature of the relationship between two database tables or two
            ascii files.<br>
<span class="boldtext">Example(s): </span>
<br>1.Must be greater than 0 but less than 100 2. "The
            primary key of the table BIRD_SURVEY is composed of two
            attributes:speciesCode and observationDate 3. The species name
            associated with the species code in survey.txt can be found in the
            file speciesList.txt<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="key">key&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#attributeReference">attributeReference</a></td><td class="tablepanel">required</td><td class="tablepanel">unbounded</td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The key element defines the set of attributes to
            which this constraint applies. For a primary key or a unique key,
            the set of attributes must be identifying. For a foreign key, the
            set of attributes must match an identifying key in the referenced
            entity. For a 'not null' constraint, the key indicates the attribute
            which should not be null.</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="attributeReference">attributeReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The attributeReference element is the
                  identifier of an attribute that can be found in the
                  identified entity. This id will be unique within an
                  entity and specifies that the attribute participates
                  in the key that is being defined.<br>
<span class="boldtext">Example(s): </span>
<br>site<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="entityReference">entityReference&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="eml-resource.html#NonEmptyStringType">res:NonEmptyStringType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The entityReference element contains the id of the
            entity to which a foreign key refers, otherwise known as the
            parent-entity or parent-table. This should be an identifier that
            matches one of the "identifier" elements for an
            entity.<br>
<span class="boldtext">Example(s): </span>
<br>knb.79.4<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="relationshipType">relationshipType&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0"></table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The relationshipType element defines identifying
            relationships that propagate from the parent entity's primary key to
            the child's primary key. Non-identifying relationships propagate the
            parent's primary key as a non-key attribute of the child
            entity.<br>
<span class="boldtext">Example(s): </span>
<br>relationshipType code<br>
</blockquote>
</td>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Derived from: </span><span class="boldtext">xs:string</span> (by xs:restriction) </p>
<p>
<span class="boldtext">Allowed values: </span>
<ul>
<li>identifying</li>
<li>non-identifying</li>
</ul>
</p>
</td>
</tr>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="cardinality">cardinality&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#parentOccurences">parentOccurences</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#childOccurences">childOccurences</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The cardinality element represents a statement of
            the relationship between parent and child entities. Cardinality is
            expressed as the ratio of related parent and child
            entities. Cardinality 1 to N is a specific form of cardinality in
            which zero or one parent records are related to a specified number
            of child records. The cardinality ratio for the parent entity
            depends on whether the "existence" is mandatory (one or more) or
            optional (zero to ...).<br>
<span class="boldtext">Example(s): </span>
<br>One to many<br>One to 10<br>Zero or One to Many<br>
</blockquote>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="parentOccurences">parentOccurences&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0"></table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The parentOccurences element describes the
                  Parent portion of a 1 to exactly N cardinality. May have a
                  value of either 0 or 1. Value of 0 implies that the
                  "existence" of a child record is optional.  Value of 1 implies
                  that the "existence" of a child record is
                  mandatory.<br>
<span class="boldtext">Example(s): </span>
<br>One to 10, Zero or One to Many<br>
</blockquote>
</td>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Derived from: </span><span class="boldtext">xs:integer</span> (by xs:restriction) </p>
<p>
<span class="boldtext">Allowed values: </span>
<ul>
<li>0</li>
<li>1</li>
</ul>
</p>
</td>
</tr>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="childOccurences">childOccurences&nbsp; </a></td><td class="tablehead" colspan="1">This element has no default value.</td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext">Type: </span><a class="sitelink" href="#CardinalityChildOccurancesType">CardinalityChildOccurancesType</a></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The childOccurences element describes the
                  child portion of a cardinality expression Allowed values are
                  positive integers including zero or the string value
                  "many"<br>
<span class="boldtext">Example(s): </span>
<br>2, 15, many<br>
</blockquote>
</td>
</tr>
<tr>
<td colspan="2">
<h2>Attribute Definitions:</h2>
</td>
</tr>
<tr>
<td colspan="2" class="tablehead"><a class="sitelink" name="language">language</a></td>
</tr>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Type: </span><span class="plaintext"><span class="boldtext">xs:string</span></span>
</p>
<p>
<span class="boldtext">Use: </span><span class="plaintext">optional</span>
</p>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The language element declares the language
                that is used to implement the check constraint.  This is
                typically the name and version of a programming language such as
                Java, C, Perl, Basic, or other.  Sometime it is the name and
                version of a scriptable analysis system such as SAS, Matlab, R,
                or SPlus.
                <br>
<span class="boldtext">Example(s): </span>
<br>Perl 5.6.1<br>
</blockquote>
</td>
</tr>
<tr>
<td colspan="2" class="tablehead"><a class="sitelink" name="id">id</a></td>
</tr>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Type: </span><span class="plaintext"><a class="sitelink" href="eml-resource.html#IDType">res:IDType</a></span>
</p>
<p>
<span class="boldtext">Use: </span><span class="plaintext">optional</span>
</p>
</td>
</tr>
<tr>
<td colspan="2" class="tablehead"><a class="sitelink" name="system">system</a></td>
</tr>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Type: </span><span class="plaintext"><a class="sitelink" href="eml-resource.html#SystemType">res:SystemType</a></span>
</p>
<p>
<span class="boldtext">Use: </span><span class="plaintext">optional</span>
</p>
</td>
</tr>
<tr>
<td colspan="2" class="tablehead"><a class="sitelink" name="scope">scope</a></td>
</tr>
<tr>
<td class="tablepanel">
<p>
<span class="boldtext">Type: </span><span class="plaintext"><a class="sitelink" href="eml-resource.html#ScopeType">res:ScopeType</a></span>
</p>
<p>
<span class="boldtext">Use: </span><span class="plaintext">optional</span>
</p>
<p>
<span class="boldtext">Default value: </span><span class="plaintext">document</span>
</p>
</td>
</tr>
<tr>
<td colspan="2">
<h2>Complex Type Definitions:</h2>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="ConstraintType">ConstraintType&nbsp; </a></td><td class="tablehead" colspan="1">
              </td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A choice of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#primaryKey">primaryKey</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> OR </td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#uniqueKey">uniqueKey</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> OR </td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#checkConstraint">checkConstraint</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> OR </td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#foreignKey">foreignKey</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> OR </td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#joinCondition">joinCondition</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> OR </td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#notNullConstraint">notNullConstraint</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Attributes: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Default Value: </span></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#id">id</a></td><td class="tablepanel"><span class="plaintext">optional</span></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#system">system</a></td><td class="tablepanel"><span class="plaintext">optional</span></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#scope">scope</a></td><td class="tablepanel"><span class="plaintext">optional</span></td><td class="tablepanel"><span class="plaintext">document</span></td>
</tr>
</table>
</td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The ConstraintType type describes the relational
        integrity constraints of a relational database. This includes primary
        keys, foreign keys, unique keys, etc. When an eml-constraint module is
        created, it should be linked into a dataset using the "triple" element,
        and all of the entities that are referenced in the constraints should be
        accessible within that same package.</blockquote>
</td>
</tr>
<tr>
<td colspan="2">
<h2>Simple Type Definitions:</h2>
</td>
</tr>
<tr>
<td class="tablehead" colspan="2">
<h3>
<a class="sitelink" name="CardinalityChildOccurancesType">CardinalityChildOccurancesType</a>
</h3>
</td>
</tr>
<tr>
<td class="tablepanel"></td><td valign="top" class="tablepanel" colspan="1">
<blockquote>The CardinalityChildOccurancesType element defines the
        child portion of a cardinality expression.  Allowed values are positive
        integers including zero or the string value "many".<br>
<span class="boldtext">Example(s): </span>
<br>0,1, 2, 15,many<br>
</blockquote>
</td>
</tr>
<tr>
<td colspan="2">
<h2>Group Definitions:</h2>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="ConstraintBaseGroup">ConstraintBaseGroup&nbsp; </a></td><td class="tablehead" colspan="1">
              </td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#constraintName">constraintName</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#constraintDescription">constraintDescription</a></td><td class="tablepanel">optional</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tablehead" colspan="1"><a class="sitelink" name="ForeignKeyGroup">ForeignKeyGroup&nbsp; </a></td><td class="tablehead" colspan="1">
              </td>
</tr>
<tr>
<td width="40%" class="tablepanel"> Content of this field: </td><td class="tablepanel"> Description of this field: </td>
</tr>
<tr>
<td class="tablepanel">
<table class="tabledefault" border="0">
<tr>
<td class="tablepanel" valign="top"><span class="boldtext"> Elements: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> Use: </span></td><td class="tablepanel" valign="top"><span class="boldtext"> How many: </span></td>
</tr>
<tr>
<td class="tablepanel" colspan="3"> A sequence of (</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#ConstraintBaseGroup">ConstraintBaseGroup</a></td><td class="tablepanel">&nbsp;</td><td class="tablepanel">&nbsp;</td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#key">key</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#entityReference">entityReference</a></td><td class="tablepanel">required</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#relationshipType">relationshipType</a></td><td class="tablepanel">optional</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel"><a class="sitelink" href="#cardinality">cardinality</a></td><td class="tablepanel">optional</td><td class="tablepanel"></td>
</tr>
<tr>
<td class="tablepanel" colspan="3">)</td>
</tr>
</table>
</td>
</tr>
</table>
<p class="contact"> Web Contact: <a href="mailto:jones@nceas.ucsb.edu">jones@nceas.ucsb.edu</a>
</p>
</body>
</html>
